package archer.framework.core.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 常量解释器
 *
 * @author christ
 * @date 2016/3/31
 */
public class ConstantDescription {

    private static Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();

    public static void register(String name, Map constant) {
        map.put(name, constant);
    }

    public static String getDescription(String name, String key) {
        Map<String, String> descriptions = map.get(name);
        if (descriptions == null) {
            return null;
        }
        return descriptions.get(key);
    }
}
